<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 cosen $
*/
defined('BY_JYA') or exit('error');
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'display';
$return=array();
if($_RQ['op']=='display'){
	//$fenlei=pdo_getall('core_account_article_fenlei',array('uniacid'=>$_SESSION['uniacid']),array('id','title'),'id');
	$params=array();
	if($_RQ['title']){
		$params['title like']='%'.trim($_RQ['title']).'%';
		$return['params']['title']=$_RQ['title'];
	}
	if($_RQ['jrid']){
		$params['jrid']=intval($_RQ['jrid']);
		$return['params']['jrid']=intval($_RQ['jrid']);
	}else{
		$return['params']['jrid']=0;
	}
	if($_RQ['type']){
		$params['type']=intval($_RQ['type']);
		$return['params']['type']=intval($_RQ['type']);
	}else{
		$return['params']['type']=0;
	}
	$fields=array('id','title','name','createtime','image','type','desc');
	$orderby=array();
	$pindex = max(1, intval($_RQ['page']));
	$psize = 30;
	$total='';
	$list=pdo_getslice('core_h5game',$params,array($pindex,$psize),$total,$fields,'','id desc');
	if($list){
		foreach($list as &$item){
			$item['createtime']=date('y/m/d H:i:s',$item['createtime']);
			$item['url']=custom_url('jy_h5game/welcome//id='.$item['id'],true);
		}
	}
	$return['jier'] = array(
		array('id'=>1,'title'=>'除夕'),
		array('id'=>2,'title'=>'春节'),
		array('id'=>3,'title'=>'立春'),
		array('id'=>4,'title'=>'元宵节'),
		array('id'=>5,'title'=>'情人节'),
		array('id'=>6,'title'=>'惊蛰'),
		array('id'=>7,'title'=>'妇女节'),
		array('id'=>8,'title'=>'植树节'),
		array('id'=>9,'title'=>'白色情人节'),
		array('id'=>10,'title'=>'春分'),
		array('id'=>11,'title'=>'愚人节'),
		array('id'=>12,'title'=>'清明节'),
		array('id'=>13,'title'=>'复活节'),
		array('id'=>14,'title'=>'劳动节'),
		array('id'=>15,'title'=>'母亲节'),
		array('id'=>16,'title'=>'世界地球日'),
		array('id'=>17,'title'=>'吃货节'),
		array('id'=>18,'title'=>'520情人节'),
		array('id'=>19,'title'=>'端午节'),
		array('id'=>20,'title'=>'国际儿童节'),
		array('id'=>21,'title'=>'父亲节'),
		array('id'=>22,'title'=>'618年中大促'),
		array('id'=>23,'title'=>'夏至'),
		array('id'=>24,'title'=>'建军节'),
		array('id'=>25,'title'=>'七夕'),
		array('id'=>26,'title'=>'迎新开学季'),
		array('id'=>27,'title'=>'中元节'),
		array('id'=>28,'title'=>'教师节'),
		array('id'=>29,'title'=>'秋分'),
		array('id'=>30,'title'=>'国庆节'),
		array('id'=>31,'title'=>'中秋节'),
		array('id'=>32,'title'=>'重阳节'),
		array('id'=>33,'title'=>'万圣节'),
		array('id'=>34,'title'=>'立冬'),
		array('id'=>35,'title'=>'双十一'),
		array('id'=>36,'title'=>'冬至'),
		array('id'=>37,'title'=>'平安夜'),
		array('id'=>38,'title'=>'圣诞节'),
		array('id'=>39,'title'=>'元旦节'),
		array('id'=>40,'title'=>'感恩节'),
		array('id'=>41,'title'=>'腊八节'),
		array('id'=>42,'title'=>'其他热点'),
	);
	$return['list']=$list?$list:array();
	$totalpage=ceil($total/$psize);
	$totalpage=intval($totalpage);
	$return['totalpage'] =$totalpage;
	$return['params']['page'] =$pindex;
	exi($return);
}
?>